namespace py redis_obj




service RedisObj {
    // key 操作
    list<string> keys(1:string salt_pwd,2:string pattern) // 获取所有符合规则的key
    string type(1:string salt_pwd,2:string name) // 判断key类型
    i32 delete_(1:string salt_pwd,2:string name) // 删除key
    bool exists(1:string salt_pwd,2:string name) // 是否存在
    bool flushdb(1:string salt_pwd) //删除当期数据库中的key
    bool flushall(1:string salt_pwd) //删除数据库中的key
    //String 操作
    string get(1:string salt_pwd,2:string name)
    bool set_(1:string salt_pwd,2:string name,3:string value)
    string getset(1:string salt_pwd,2:string name,3:string value)
    bool setnx(1:string salt_pwd,2:string name,3:string value)
    list<string>  mget(1:string salt_pwd,2:list<string> keys)
    bool setex(1:string salt_pwd,2:string name,3:i32 time,4:string value)

    //List 操作
    i32 llen(1:string salt_pwd,2:string name) //长度
    list<string> lrange(1:string salt_pwd,2:string name,3:i32 start,4:i32 len)

    //Set 操作
    set<string> smembers(1:string salt_pwd,2:string name)//返回key为name的set的所有元素

    //Sorted Set 操作

    //Hash 操作
    list<string> hkeys(1:string salt_pwd,2:string name)//key=name 的所有键名
    list<string> hvals(1:string salt_pwd,2:string name)//key=name 的所有键值

}